package com.anywhere.freightman.system.service;


import com.anywhere.freightman.common.IBaseEntityService;
import com.anywhere.freightman.common.entity.user.Account;
import com.anywhere.freightman.common.entity.user.UserQueryEntity;
import com.anywhere.freightman.common.enumeration.CommonStatus;
import com.anywhere.freightman.system.model.Resource;
import com.anywhere.freightman.system.model.UserModel;

import java.util.List;
import java.util.Set;

public interface IUserService extends IBaseEntityService<UserModel, UserQueryEntity> {
    UserModel selectByMobilePhone(String mobilePhone);

    UserModel selectByUsername(String username);

    Account selectByToken(String token);

    Account login(String username, String password);

    void updatePwd(long id, String pwd, String newPwd);

    void updatePwd(long id, String newPwd);

    void updateRole(long id, List<Long> roleIds);

    Set<Resource> getResources(long userId);

    Set<Resource> getResources(String token);

    List<UserModel> getListByCompanyId(Long companyId);

    void insert(UserModel model, CommonStatus status);
}
